#pragma once

#include "xutil/prefix.h"


/*! make djb2 hash
 *
 * see http://www.cse.yorku.ca/~oz/hash.html
 *
 * @param data      the data
 * @param size      the size
 * @param seed      uses this seed if be non-zero
 *
 * @return          the djb2 value
 */
xu_size_t           xu_djb2_make(xu_byte_t const* data, xu_size_t size, xu_size_t seed);

/*! make djb2 hash from c-string
 *
 * @param cstr      the c-string
 * @param seed      uses this seed if be non-zero
 *
 * @return          the djb2 value
 */
xu_size_t           xu_djb2_make_from_cstr(xu_char_t const* cstr, xu_size_t seed);
